package treepro;

import javax.swing.JList;
import javax.swing.JTable;
import javax.swing.ListModel;

/**
 *
 * @author Ivan
 */
class RowHeaderList extends JList {
    private final JTable table;
    @SuppressWarnings("unchecked")
    public RowHeaderList(ListModel model, JTable table) {
        super(model);
        this.table = table;
        setFixedCellHeight(table.getRowHeight());
        setCellRenderer(new RowHeaderRenderer(table.getTableHeader()));
        setSelectionModel(table.getSelectionModel());
        //setBorder(BorderFactory.createMatteBorder(1,0,0,0,Color.GRAY.brighter()));
    }
}
